﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="dsinvoice" targetNamespace="http://tempuri.org/dsinvoice.xsd" xmlns:mstns="http://tempuri.org/dsinvoice.xsd" xmlns="http://tempuri.org/dsinvoice.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="tailoringmngConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="tailoringmngConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.Tailoring.Properties.Settings.GlobalReference.Default.tailoringmngConnectionString" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="dtdeliveryTableAdapter" GeneratorDataComponentClassName="dtdeliveryTableAdapter" Name="dtdelivery" UserDataComponentName="dtdeliveryTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="tailoringmngConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        tblclientinfo.clientId, tblclientinfo.name, tblclientinfo.city, tblorder.orderId, tblorder.curentDate, tblorder.deliveryDate, tblorder.nubmerOfCloths, tblaccount.account, tblaccount.orderId AS Aoid, 
                         tblaccount.totalAmount, tblaccount.amountRece, tblaccount.amountBal, tblorder.clientId AS ocid
FROM            tblclientinfo INNER JOIN
                         tblorder ON tblclientinfo.clientId = tblorder.clientId INNER JOIN
                         tblaccount ON tblclientinfo.clientId = tblaccount.clientId
WHERE        (tblaccount.orderId = @oid) AND (tblclientinfo.clientId = @cid) AND (tblorder.orderId = @oid)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="oid" ColumnName="orderId" DataSourceName="tailoringmng.dbo.tblaccount" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@oid" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Aoid" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="cid" ColumnName="clientId" DataSourceName="tailoringmng.dbo.tblclientinfo" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@cid" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="clientId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="clientId" DataSetColumn="clientId" />
              <Mapping SourceColumn="name" DataSetColumn="name" />
              <Mapping SourceColumn="city" DataSetColumn="city" />
              <Mapping SourceColumn="orderId" DataSetColumn="orderId" />
              <Mapping SourceColumn="curentDate" DataSetColumn="curentDate" />
              <Mapping SourceColumn="deliveryDate" DataSetColumn="deliveryDate" />
              <Mapping SourceColumn="nubmerOfCloths" DataSetColumn="nubmerOfCloths" />
              <Mapping SourceColumn="account" DataSetColumn="account" />
              <Mapping SourceColumn="totalAmount" DataSetColumn="totalAmount" />
              <Mapping SourceColumn="amountRece" DataSetColumn="amountRece" />
              <Mapping SourceColumn="amountBal" DataSetColumn="amountBal" />
              <Mapping SourceColumn="ocid" DataSetColumn="ocid" />
              <Mapping SourceColumn="Aoid" DataSetColumn="Aoid" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="dsinvoice" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="dsinvoice" msprop:Generator_UserDSName="dsinvoice">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="dtdelivery" msprop:Generator_TableClassName="dtdeliveryDataTable" msprop:Generator_TableVarName="tabledtdelivery" msprop:Generator_RowChangedName="dtdeliveryRowChanged" msprop:Generator_TablePropName="dtdelivery" msprop:Generator_RowDeletingName="dtdeliveryRowDeleting" msprop:Generator_RowChangingName="dtdeliveryRowChanging" msprop:Generator_RowEvHandlerName="dtdeliveryRowChangeEventHandler" msprop:Generator_RowDeletedName="dtdeliveryRowDeleted" msprop:Generator_RowClassName="dtdeliveryRow" msprop:Generator_UserTableName="dtdelivery" msprop:Generator_RowEvArgName="dtdeliveryRowChangeEvent">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="clientId" msprop:Generator_ColumnVarNameInTable="columnclientId" msprop:Generator_ColumnPropNameInRow="clientId" msprop:Generator_ColumnPropNameInTable="clientIdColumn" msprop:Generator_UserColumnName="clientId" type="xs:int" />
              <xs:element name="name" msprop:Generator_ColumnVarNameInTable="columnname" msprop:Generator_ColumnPropNameInRow="name" msprop:Generator_ColumnPropNameInTable="nameColumn" msprop:Generator_UserColumnName="name">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="city" msprop:Generator_ColumnVarNameInTable="columncity" msprop:Generator_ColumnPropNameInRow="city" msprop:Generator_ColumnPropNameInTable="cityColumn" msprop:Generator_UserColumnName="city">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="15" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="orderId" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnorderId" msprop:Generator_ColumnPropNameInRow="orderId" msprop:Generator_ColumnPropNameInTable="orderIdColumn" msprop:Generator_UserColumnName="orderId" type="xs:int" />
              <xs:element name="curentDate" msprop:Generator_ColumnVarNameInTable="columncurentDate" msprop:Generator_ColumnPropNameInRow="curentDate" msprop:Generator_ColumnPropNameInTable="curentDateColumn" msprop:Generator_UserColumnName="curentDate" type="xs:dateTime" />
              <xs:element name="deliveryDate" msprop:Generator_ColumnVarNameInTable="columndeliveryDate" msprop:Generator_ColumnPropNameInRow="deliveryDate" msprop:Generator_ColumnPropNameInTable="deliveryDateColumn" msprop:Generator_UserColumnName="deliveryDate" type="xs:dateTime" />
              <xs:element name="nubmerOfCloths" msprop:Generator_ColumnVarNameInTable="columnnubmerOfCloths" msprop:Generator_ColumnPropNameInRow="nubmerOfCloths" msprop:Generator_ColumnPropNameInTable="nubmerOfClothsColumn" msprop:Generator_UserColumnName="nubmerOfCloths" type="xs:int" />
              <xs:element name="account" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnaccount" msprop:Generator_ColumnPropNameInRow="account" msprop:Generator_ColumnPropNameInTable="accountColumn" msprop:Generator_UserColumnName="account" type="xs:int" />
              <xs:element name="totalAmount" msprop:Generator_ColumnVarNameInTable="columntotalAmount" msprop:Generator_ColumnPropNameInRow="totalAmount" msprop:Generator_ColumnPropNameInTable="totalAmountColumn" msprop:Generator_UserColumnName="totalAmount" type="xs:int" minOccurs="0" />
              <xs:element name="amountRece" msprop:Generator_ColumnVarNameInTable="columnamountRece" msprop:Generator_ColumnPropNameInRow="amountRece" msprop:Generator_ColumnPropNameInTable="amountReceColumn" msprop:Generator_UserColumnName="amountRece" type="xs:int" minOccurs="0" />
              <xs:element name="amountBal" msprop:Generator_ColumnVarNameInTable="columnamountBal" msprop:Generator_ColumnPropNameInRow="amountBal" msprop:Generator_ColumnPropNameInTable="amountBalColumn" msprop:Generator_UserColumnName="amountBal" type="xs:int" minOccurs="0" />
              <xs:element name="ocid" msprop:Generator_ColumnVarNameInTable="columnocid" msprop:Generator_ColumnPropNameInRow="ocid" msprop:Generator_ColumnPropNameInTable="ocidColumn" msprop:Generator_UserColumnName="ocid" type="xs:int" />
              <xs:element name="Aoid" msprop:Generator_ColumnVarNameInTable="columnAoid" msprop:Generator_ColumnPropNameInRow="Aoid" msprop:Generator_ColumnPropNameInTable="AoidColumn" msprop:Generator_UserColumnName="Aoid" type="xs:int" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:dtdelivery" />
      <xs:field xpath="mstns:clientId" />
      <xs:field xpath="mstns:orderId" />
      <xs:field xpath="mstns:account" />
    </xs:unique>
  </xs:element>
</xs:schema>